<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>简单个人页面</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <script src="/js/plugins/jquery-form/jquery.form.js"></script>
    <script>
        $(function () {
            //接收在共享与里的user
            var userJsonStr = sessionStorage.getItem("user");
            var user;
            if (userJsonStr) {
                //把字符串解析为json对象
                user=JSON.parse(userJsonStr);
                $(".simplePerson").renderValues(user)
            }


            $("#logout").click(function () {
                $.ajax({
                    url: "/sessions",
                    type: "DELETE",
                    success: function () {
                        window.parent.location.href = "/login.html";
                    }
                })
            })
            $("#myPro").click(function () {
               var url= $(this).data("href")
                window.parent.location.href=url;
            })
            $("#myMsg").click(function () {
                var url= $(this).data("href")
                window.parent.location.href=url;
            })
            $("#sysSet").click(function () {
                var url= $(this).data("href")
                window.parent.location.href=url;
            })
            $("#mySys").click(function () {
                var url= $(this).data("href")
                window.parent.location.href=url;
            })
        })


    </script>
    <style>
        .simplePerson {
            text-align: center;
            color: #7A786F;
            padding-top: 50px;
            padding-bottom: 110px;
            background-color: #E8E6E8;
        }

        .mymenu {
            margin: 15px auto;
        }

        .mymenu i {
            margin-right: 20px;
        }

    </style>


</head>


<body>

<div class="simplePerson">
    <img render-src="headImgUrl" class="rounded-circle fa-spin" width="20%">
    <p><strong render-html="nikeName"></strong></p>
    <p render-html="email"></p>
    <hr>
    <div class="mymenu">
        <i class="fa fa-user fa-2x fa-fw"></i>
        <a href="javaScript:;" id="myPro" data-href="/mine/profiles.html">
            我的</a>
    </div>
    <div class="mymenu">
        <i class="fa fa-bell fa-2x fa-fw"></i>
        <a href="javaScript:;" id="mySys" data-href="/mine/message.html">通知</a>
    </div>
    <div class="mymenu">
        <i class="fa fa-comment fa-2x fa-fw"></i>
        <a href="javaScript:;" id="myMsg" data-href="/mine/message.html">信息</a>
    </div>
    <div class="mymenu">
        <i class="fa fa-cog fa-2x fa-fw"></i>
        <a id="sysSet" href="javaScript:;" data-href="/mine/info.html">设置</a>
    </div>
    <hr style="margin-top: 50px;">
    <div id="logout" class="mymenu">
        <i class="fa fa-sign-out fa-2x fa-fw"></i>
        <label>退出登录</label>
    </div>
</div>


</body>

</html>